package com.ftl.autopunch.controller;

import com.ftl.autopunch.entity.SysUser;
import com.ftl.autopunch.model.LoginFormModel;
import com.ftl.autopunch.model.UserTokenModel;
import com.ftl.autopunch.service.PunchService;
import com.ftl.autopunch.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

@RestController
public class TestController {
    @Autowired
    SysUserService sysUserService;
    @Autowired
    PunchService punchService;
    @GetMapping("/test")
    public void test() throws IOException {
//        LoginFormModel loginFormModel = sysUserService.getLoginForm();
//        UserTokenModel userTokenModel = sysUserService.doLogin(loginFormModel, new SysUser("20203440", "18367750191"));
//        boolean punchStatus = punchService.punchAction(userTokenModel.getServerSessionId(),userTokenModel.getUserSessionId());
//        System.out.println(punchStatus);
    }
}
